/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.pucp.Servicio;

import java.util.ArrayList;
import pe.edu.pucp.DAO.DAOFactura;
import pe.edu.pucp.DAO.DAOFacturacion;
import pe.edu.pucp.bean.Contenedor;
import pe.edu.pucp.bean.Factura;

public class Servicio_Fact {
    public static Servicio_Fact instance = null;
    public static final int DB_TYPE = DAOFactura.ACCESS;
  
    protected void Service_Fact(){}
    
    public static Servicio_Fact get_instance(){
        if(instance == null) instance = new Servicio_Fact();
        return instance;
    }
    
     public float TotalFac(String id){
        DAOFactura daoFactura = DAOFactura.get_instance(DB_TYPE);
        DAOFacturacion daof = daoFactura.getDAOFacturacion();
        return daof.TotalFac(id);      
        }
     public int queryallFac(String idDoc){
          DAOFactura daofactura = DAOFactura.get_instance(DB_TYPE);
            DAOFacturacion daofacturacion = daofactura.getDAOFacturacion();
            return daofacturacion.queryallFac(idDoc);
        }
     public int agregaFactura(Factura f){
	      DAOFactura daofactura = DAOFactura.get_instance(DB_TYPE);
             DAOFacturacion facturacionDAO = daofactura.getDAOFacturacion();
             //services.add(serv);
             return facturacionDAO.agregaFactura(f);
        }
}
